<?php
Yii::import('application.modules.users.models.User');
class AdminController extends Controller {
	public function actionManagerbac() {
		$this->render('managerbac');
	}
	public function actionCreate() {
		$model=new User;
		if(isset($_POST['User'])) {
			$model->attributes=$_POST['User'];
			//@todo is there any elegant way of doing this?
			$model->password = md5($model->password);
			if($model->save())
				$this->redirect(array('/admin/users/index'));
		}
		$this->render('create',array(
			'model'=>$model,
		));
	}
}
